package com.basic.business.unIndicators.service;

import com.basic.business.goodsIndicators.domain.TGoodsIndicators;
import com.basic.business.unIndicators.domain.TUnboundedIndicators;
import com.basic.common.core.service.IBaseService;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;

/**
 * 无界指标数据Service接口
 *
 * @author zhaoxy_jn@163.com
 */
public interface ITUnboundedIndicatorsService extends IBaseService<TUnboundedIndicators> {

    /**
     * 根据文件id删除数据
     * @param fileId
     * @return
     */
    int deleteByFileId(String fileId);

    /**
     * 批量插入数据
     * @param list
     * @return
     */
    int saveBatch(List<TUnboundedIndicators> list);

    /**
     * 批量删除旧数据
     * @param fileId 文件ID,去重删除非本文件的数据
     * @param storeId
     * @param statDate
     * @param mainBodyIdList
     * @return
     */
    int deleteOldData(String fileId, String storeId, Date statDate, List<String> mainBodyIdList);

    /**
     * 根据商品id获取数据
     * @param mainBodyId
     * @return
     */
    List<TUnboundedIndicators> getListByMainBodyId(String mainBodyId);


    /**
     * 根据商品id删除数据
     * @param goodsList
     * @return
     */
    int deleteByGoodsId(List<TGoodsIndicators> goodsList);

    /**
     * 上传无界指标数据
     * @param file
     * @param unStoreId
     * @param fileHash
     */
    void uploadIndicatorsData(MultipartFile file, Date unSelectDate, String unStoreId, String fileHash);
}
